(define-module (mach)
  #:export (port
            task
            vm-size
            vm-address
            msg-option
            ipc-space
            port-mscount
            port-seqno
            msg-seqno
            port-delta
	    <msg-type>
            msg-type-number
            msg-type-name
            vm-offset
            msg-size
            msg-timeout
            vm-task
            port-urefs
            port-msgcount
            port-rights
            msg-bits
            msg-id
            task-self
            with-port-deallocate
            with-port-destroy
            with-port
            port-type-is?
            port-pointer
            port-valid?
            port-allocate
            port-deallocate!
            port-destroy!
            port-mod-refs!
            port-move-member!
            port-insert-right!
	    <port-type>
            port-request-notification!
            task-get-special-port
            task-get-bootstrap-port
            msg-server-timeout
            msg-server
            mmap-prot-flags
            mmap-map-flags
            mmap
            munmap
            vm-allocate
            vm-deallocate
            reply-port
            port-allocate-name
            port-names
            port-rename
            port-get-refs
            port-extract-right!
            port-set-mscount!
            port-set-qlimit!
            +qlimit-default+
            +qlimit-min+
            +qlimit-max+
            port-set-seqno!
            port-get-set-status
            port-get-receive-status
            port-status-has-send-rights?
	    <port-status-struct>
            port-status-has-port-deleted-notification?
            port-status-has-no-senders-notification?
            port-status-get-set
            port-status-get-mscount
            port-status-get-queue-limit
            port-status-get-msgcount
            port-status-get-so-rights
            msg-add-type
            message-spec
            message
            msg-spec
            msg-fields
            spec-id
            spec-fields
            spec-size
            send-message
            receive-message
            validate-message
            get-message
            get-message-id
            get-message-local-port
            get-message-remote-port
            make-message
            make-message-spec

	    ;; Some things not exported in the CL port
	    &port-invalid make-port-invalid port-invalid?
	    port-invalid-expression port-invalid-return)
  #:use-module (oop goops)
  #:use-module (rnrs base)
  #:use-module (rnrs arithmetic fixnums)
  #:use-module (rnrs exceptions)
  #:use-module (rnrs conditions)
  #:use-module (hurd-cl-compat))

(read-set! keywords 'prefix)

(define-syntax-rule (include-from-paths x ...)
  (begin (include-from-path x)
	 ...))

(define-syntax-rule (in-package #:mach)
  (begin #f))

(include-from-paths
 "mach/msg-type-name.lisp"
 "mach/task-special-ports.lisp"
 "mach/port-right.lisp"
 "mach/port-type.lisp"
 "mach/port.lisp"
 "mach/msg-notify.lisp"
 "mach/msg-option.lisp"
 "mach/msg-type.lisp"
 "mach/types.lisp"
 "mach/msg-header.lisp"
 "mach/port-creation.lisp"
 "mach/port-destruction.lisp"
 "mach/task.lisp"
 "mach/port-names.lisp"
 "mach/port-rights.lisp"
 "mach/port-move.lisp"
 "mach/port-status.lisp"
 "mach/port-receive-rights.lisp"
 "mach/port-sets.lisp"
 "mach/port-request-notifications.lisp"
 "mach/msg-server.lisp"
 "mach/message.lisp"
 "mach/functions.lisp"
 "mach/macros.lisp"
 "mach/mmap.lisp"
 "mach/vm-allocate.lisp")


